/*
 * @Author: NtyAaron
 * @Date: 2021-04-10 20:11:43
 * @LastEditors: NtyAaron
 * @LastEditTime: 2021-06-23 14:22:10
 * @Description: 巴士查询
 * @FilePath: \dwq\api\checkBus\checkBus.js
 */

import request from '../../utils/request'

// 获取起始城市列表
export const getStartBusList = (e) => {
  return request({
    url: `/bus/getStartBusList?language=${e || 1}`,
  })
}

// 获取终点城市列表
export const getEndBusList = (e) => {
  return request({
    url: `/bus/getEndBusList?language=${e}`,
  })
}

// 获取所有路线数据
export const getRoute = () => {
  return request({
    url: '/bus/getRoute',
  })
}

// 更新所有路线数据
export const saveBus = () => {
  return request({
    url: '/bus/saveBus',
  })
}

// 根据区域获取巴士班次数据
export const getSchedule = (e) => {
  return request({
    url: `/bus/getSchedule?arrDttId=${e.arrDttId}&depDttId=${e.depDttId}&dteDteId=${e.dteDteId}`,
  })
}

// 根据起点城市获取区域数据
export const getBusByStart = (e) => {
  return request({
    url: `/bus/getBusByStart?cityName=${e}`,
  })
}
// 根据终点城市获取区域数据
export const getBusByEnd = (e) => {
  return request({
    url: `/bus/getBusByEnd?cityName=${e}`,
  })
}

// 获取巴士营运商数据
export const getOperator = (data) => {
  return request({
    url: `/bus/getOperator`,
    data,
  })
}
